package com.bluedot.action;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.bluedot.dao.CustDaoImpl;
import com.bluedot.domain.Cust;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class SelectAction extends ActionSupport {
	private String manager;
	private Cust cust;
	private List<Cust> list=new ArrayList<Cust>();

	public Cust getCust() {
		return cust;
	}

	public void setCust(Cust cust) {
		this.cust = cust;
	}

	public String execute() throws Exception {
		CustDaoImpl cdi = new CustDaoImpl();
		 list = cdi.findAllCust();
	
		if(list!=null&&list.size()!=0){
		ActionContext.getContext().getSession().put("list", list);
			return SUCCESS;
		}
		return SUCCESS;
	}

	public String getManager() {
		return manager;
	}

	public void setManager(String manager) {
		this.manager = manager;
	}

}
